package com.zy.business.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zy.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @description: 请假审核表
 * @author: whf
 * @create: 2023-03-22 14:33
 **/
@Data
@ApiModel
@EqualsAndHashCode
@TableName("tb_absence_audit" )
public class TbAbsenceAudit extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty
    private Long id;

    @TableField("absence_id" )
    @ApiModelProperty(value ="请假id")
    private Long absenceId;

    /**
     * 状态0不通过1通过
     */
    @TableField("status")
    @ApiModelProperty(value ="状态（1.待审批2.同意3.拒绝）")
    private Integer status;

    /**
     * 审批人id
     */
    @TableField("approve_id" )
    @ApiModelProperty(value ="审批人id")
    private Long approveId;

    /**
     * 审批人名字
     */
    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    private String approveUser;

    /**
     * 审批意见
     */
    @TableField(value = "approve_reason",updateStrategy = FieldStrategy.IGNORED )
    @ApiModelProperty(value ="审批意见")
    private String approveReason;

    /**
     * 审批时间
     */
    @TableField(value = "approve_time",updateStrategy = FieldStrategy.IGNORED )
    @ApiModelProperty(hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date approveTime;

    /**
     * 下级审核人id
     */
    @TableField(exist = false)
    @ApiModelProperty(value ="下级审核人id")
    private Long nextUserId;
}
